<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>练习一：实现一个加法计算器</title>
  </head>

  <body>

  </body>
  <script>
    /* 
    练习一：实现一个加法计算器
     */
    function addCalculate() {
      var total = 0;
      for (var i = 0; i < arguments.length; i++) {
        total += arguments[i];
      }
      return total;
    }
    console.log(addCalculate(10, 30, 60));
  </script>

</html>